<?php
    namespace Home\Model;
    use Think\Model;
    class NotesModel extends Model
        {
        protected  $_validate =  array
            (
            array('name','require','必须输入呢称！'),
            array('content','require','必须输入愿望内容！'),
            );//定义自动完成
        protected $_auto=  array
            (
            array('m_date','getTime',1,'callback'),
            );
        protected function  getTime()
            {
            return date("Y-m-d H:i:s");
            }        
        }

